package cn.calm.osgi.jpa.client;

import java.io.PrintStream;

import org.apache.felix.shell.Command;

import cn.calm.jpa.Hello;

import aQute.bnd.annotation.component.Component;
import aQute.bnd.annotation.component.Reference;

@Component
public class Jpa implements Command{
	private Hello hello;
	@Override
	public void execute(String arg0, PrintStream arg1, PrintStream arg2) {
		System.out.println(hello);
		hello.helloJpa();
	}

	@Override
	public String getName() {
		return "jpa";
	}

	@Override
	public String getShortDescription() {
		// TODO Auto-generated method stub
		return "jpa";
	}

	@Override
	public String getUsage() {
		// TODO Auto-generated method stub
		return "jpa";
	}
	
	@Reference
	public void setHello(Hello hello) {
		this.hello = hello;
	}
}
